/*
 *@Author: 张楚
 *@Date: 2021-08-18 10:04:02
 *@Description: open  // colse 
*/
import 'package:flutter/material.dart';

class ColoseOpenPage extends StatefulWidget {
  const ColoseOpenPage({Key key}) : super(key: key);
  @override
  _ColoseOpenPageState createState() => _ColoseOpenPageState();
}

class _ColoseOpenPageState extends State<ColoseOpenPage> {
  bool isShow = false;
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('展开收起'),
      ),
      body: Padding(
        padding: EdgeInsets.only(bottom: 18, right: 14, left: 15),
        child: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Row(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                Text(
                  '转发内容',
                  style: TextStyle(
                      fontSize: 14,
                      color: Color(0xff333333),
                      fontWeight: FontWeight.w500),
                ),
                isShow
                    ? IconButton(
                        icon: Icon(
                          Icons.keyboard_arrow_right,
                          color: Color(0xff999999),
                          size: 20,
                        ),
                        onPressed: () {
                          setState(() {
                            isShow = !isShow;
                          });
                        })
                    : IconButton(
                        icon: Icon(
                          Icons.arrow_downward,
                          color: Color(0xff999999),
                          size: 15,
                        ),
                        onPressed: () {
                          setState(() {
                            isShow = !isShow;
                          });
                        })
              ],
            ),
            Padding(
              padding: const EdgeInsets.symmetric(vertical: 10),
              child: RichText(
                  text: TextSpan(
                      // style: DefaultTextStyle.of(context).style,
                      style: TextStyle(
                        fontSize: 12,
                        color: Color(0xff999999),
                      ),
                      children: [
                    TextSpan(
                      text: '来自于:',
                    ),
                    TextSpan(
                      text: '    向国庆',
                    ),
                  ])),
            ),
            DefaultTextStyle(
              style: TextStyle(
                fontSize: 12,
                color: Color(0xff999999),
              ),
              child: Row(
                // mainAxisAlignment: MainAxisAlignment.start,
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text('发件人意见:'),
                  SizedBox(
                    width: 10,
                  ),
                  Expanded(
                    child: Padding(
                        padding: EdgeInsets.only(right: 20, top: 2),
                        child: Text(
                            '16465465s465as4d65as4d65as4d65as4d65as4d65a4d65a4d654a65d4a65d5as4d65as4d65as4d65a4d65a4d654a65d4a65as4d65as4d65as4d65a4d65a4d654a65d4a64a65d46a54d654',
                            overflow: isShow
                                ? TextOverflow.ellipsis
                                : TextOverflow.visible)),
                  )
                ],
              ),
            ),

            ///接下来 转发给 && 接受人意见
            isShow
                ? Container()
                : Padding(
                    padding: const EdgeInsets.only(top: 10),
                    child: Column(
                      children: [
                        Row(
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: [
                            Text(
                              '张三:',
                              style: TextStyle(
                                fontSize: 12,
                                color: Color(0xff999999),
                              ),
                            ),
                            SizedBox(
                              width: 10,
                            ),
                            Expanded(
                              child: Text(
                                '张三、可多人体要求。《意见》提出,要体要求。《意见》提出,要坚定不体要求。《意见》提出,要坚定不体要求。《意见》提出,要坚定不体要求体要求。《意见》提出,要体要求。《意见》提出,要坚定不体要求。《意见》提出,要坚定不体要求。《意见》提出,要坚定不体要求',
                                style: TextStyle(
                                  fontSize: 12,
                                  color: Color(0xff666666),
                                ),
                              ),
                            )
                          ],
                        ),
                        SizedBox(
                          height: 10,
                        ),
                        Row(
                          // mainAxisAlignment: MainAxisAlignment.start,
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: [
                            Text(
                              '接收人意见内容:',
                              style: TextStyle(
                                fontSize: 12,
                                color: Color(0xff999999),
                              ),
                            ),
                            SizedBox(
                              width: 10,
                            ),
                            Expanded(
                              child: Text(
                                '总。《意见》提出,要坚定不坚定不移体要求。《意见》提出,要体要求。《意见》提出,要坚定不体要求。《意见》提出,要坚定不体要求。《意见》提出,要坚定不体要求体要求。《意见》提出,要体要求。《意见》提出,要坚定不体要求。《意见》提出,要坚定不体要求。《意见》提出,要坚定不体要求',
                                style: TextStyle(
                                  fontSize: 12,
                                  color: Color(0xff666666),
                                ),
                              ),
                            )
                          ],
                        ),
                      ],
                    ),
                  )
          ],
        ),
      ),
    );
  }
}
